package com.richest.api.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.richest.api.dao.UserCollectRecordMapper;
import com.richest.api.service.IUserCollectRecordService;
import com.richest.bean.UserCollectRecordBean;

/**
 * 
 * @author zhaohongchao 2019年4月2日 上午9:15:52
 * @email 70375739@qq.com
 */
@Service
public class UserCollectRecordServiceImpl implements IUserCollectRecordService {
	@Autowired
	private UserCollectRecordMapper userCollectRecordMapper;

	@Override
	public Long insert(UserCollectRecordBean userCollectRecordBean) {
		userCollectRecordMapper.insert(userCollectRecordBean);
		return userCollectRecordBean.getUser_collect_record_id();
	}

	@Override
	public void update(UserCollectRecordBean userCollectRecordBean) {
		userCollectRecordMapper.update(userCollectRecordBean);
	}

	@Override
	public List<Map<String, Object>> selectList(Long user_id) {
		return userCollectRecordMapper.selectList(user_id);
	}

	@Override
	public UserCollectRecordBean getAdmartCollectStatus(Long user_id, Long admart_id) {
		return userCollectRecordMapper.getAdmartCollectStatus(user_id, admart_id);
	}

}
